When the Process Manager launches a threaded application, it creates the main thread and sets up the stack for it just like it would for a nonthreaded application. You can expand this stack by calling the Memory Manager SetApplLimit function at the beginning of your application. See Working With Stacks for an example of how to use this function.
For each subsequent thread that you create, the Thread Manager maintains a separate stack in your application heap area.
Note
Because the Thread Manager does not move stacks during a thread context switch, you can pass function parameters on the stack.
You specify the stack size when you create a new thread with the CreateThreadPool or NewThread function. The stack must be large enough to handle saved thread context, normal application stack usage, interrupt handling routines, and CPU exceptions. You can specify a particular size in bytes or use the default size that the Thread Manager supplies for a thread. The default size is more than adequate for most threads.